<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
	<title>评论</title>
	<link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
<style type="text/css">
a {
	text-decoration: none;
}
/*设置内容区样式*/
body {
	min-width: 320px;
}
#news {
	background-color: #f2f2f2;
}
#news ul li {
	overflow: hidden;
	border-bottom: 1px solid #d9d9d9;
}
#news ul li a {
	display: block;
	overflow: hidden;
	position: relative;
	padding: 10px 10px;
}
#news ul li a.active {
	background-color: #d9e4e9;
}
#news ul li img {
	float: left;
	width: 90px;
	height: 90px;
	border-radius: 4px;
}
#news .content {
	width: 65%;
	margin-left: 100px;
	overflow: hidden;
}
#news .content h2, #news h2 {
	width: 60%;
	font-size: 20px;
	height: 30px;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size:16px;
}
#news .content p {
	width: 100%;
	color: #333;
	overflow: hidden;
	max-height: 75px;
	font-size: 16px;
	word-wrap: break-word;
	margin-top:10px;
}
#news .t .content div:after {
	content: "专题";
	background-color: #55abce;
	border: 1px solid #55abce;
	border-radius: 4px;
	color: #fff;
	font-size: 12px;
	padding: 2px 6px;
	float: right;
	height: 14px;
	line-height: 14px;
}
#news .v a:before {
	content: "";
	display: inline-block;
	background: #0c0a0f url(../image/video.png) no-repeat center;
	-webkit-background-size: 16px 12px;
	background-size: 16px 12px;
	width: 24px;
	height: 24px;
	border: 2px solid #666;
	border-radius: 24px;
	opacity: .8;
	position: absolute;
	left: 14px;
	top: 58px;
}
.counts, .time {
	position: absolute;
	font-size: 12px;
	right: 2%;
	color:#999;
	top:12%;
}
.title {
	width: 120px;
	height: 15px;
	overflow: hidden;
}
.time {
	display: inline-block;
	width: 120px;
	height: 15px;
	overflow: hidden;
}
.foot {
	width: 100%;
	position: fixed;
	z-index: 20;
	bottom: 0px;
	height: 50px;
	background: #eeeeee;
	left:0;
}
.foot input[type="text"] {
	width:75%;
	margin-top: 5px;
	height: 40px;
	font-size: 20px;
	line-height: 40px;
	background: white;
	float:left;
	margin-left:5px;
}
.foot input[type="button"] {
width:20%;
	height: 40px;
	font-size: 20px;
	color: white;
	background: #00ABFD;
	margin:5px 0 0 8px;
}
#chengkai{
	height:50px;
	width:100%;
}
</style>
</head>
<body>

	<div class="div_loding_img">
		数据加载中
	</div>
	<header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" > <span class="aui-iconfont aui-icon-left"></span></a>
		<div class="aui-title" id="title">
			评论列表
		</div>
		<a class="aui-iconfont aui-icon-menu aui-pull-right"></a>
	</header>
	<div class="margin_div"></div>
	<div id="news">
		<ul  id="txtNewsList"></ul>
	</div>
	<div id="chengkai"></div>
	<div class="foot">
		<input type="text" id="commentCot">
		<input type="button" value="发送" onclick="upComment()">
	</div>
<script src="../../script/jquery-1.10.2.min.js"></script>
<script src="../../script/common.js"></script>
<script type="text/javascript">
var pid;
var did;
//显示数据条数
var pagesize =100;
//当前数量
var curCount = 0;
//评论总数
var comments=0;
$(document).ready(function(){
	pid=getUrlParam("pid");
	did=getUrlParam("did");
	path=getUrlParam("path");
	if(did==66666)
	{
		 $("#back").click(function(){
             window.history.go(-1);
        });
	}else
	{
	 $("#back").click(function(){
             goback(path+"?infoid="+pid+"&comments="+comments);
        });
	}
		
	getCommentList();
});
sTart_Stop();
function getCommentList()
{	
	var param='mid='+$mid+'&groupid='+$groupid+'&did='+did+'&pagesize='+pagesize+'&pid='+pid;
	ajaxcocRequest('../../../api/getbussdatareviewbypidforlist', 'POST', param, function(msg) {
		if (msg.code==100) {
			var obj = $('#txtNewsList');
			var html = '';
			var src = "../../image/defaultImg2.png";
			comments=msg.data.length;
			for (var i = 0, len = msg.data.length; i < len; i++) {
				
				var thisItem = msg.data[i];
				if(thisItem.n3!=null){
					if(thisItem.n3.indexOf("http")!=-1){
						src=thisItem.n3;
					}
				}

				html += '<li><a tapmode="active" onclick="opeinmemberinfo(\'' + thisItem.n2 + '\')"><div class="logo"><img src="' + src + '"/></div><div class="content"><h2 class="title">' + thisItem.n1 + '<span class="time">' + thisItem.n5 + '</span></h2><p>' + thisItem.n4 + '</p></div> </a></li>'
			}
			obj.html(html);
		}
		else{
			$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
		}
	});
}
//提交评论函数
function upComment() {
	var comvalue = $("#commentCot").val();
	var param = {"mid":$mid,"groupid":$groupid,"did":did,"pid":pid,"cntvalue":comvalue};

	ajaxCoCRequest('../../../api/sendreviewbymid', 'POST', param, function(msg) {
		if(msg.code==100)
		{
			$("#commentCot").val("");
			getCommentList();
		}else
		{
			$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
		}
	});
}
function opeinmemberinfo(mid)
{
	
}
</script>
</body>
</html>